package com.esender.strategy.config;

import com.esender.common.constant.RabbitMQConstants;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.QueueBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitMQConfig {
    /**
     * 接口模块发送消息到策略模块的队列
     * @return
     */
    @Bean
    public Queue mobileAreaOperatorQueue() {
        return QueueBuilder.durable(RabbitMQConstants.MOBILE_AREA_OPERATOR).build();
    }

    /**
     * 写日志得队列
     */
    @Bean
    public Queue writeLogQueue() {
        return QueueBuilder.durable(RabbitMQConstants.SMS_WRITE_LOG).build();
    }

    /**
     * 定义一个发送状态报告得队列
     * @return
     */
    @Bean
    public Queue smsPushReportQueue(){
        return QueueBuilder.durable(RabbitMQConstants.SMS_PUSH_REPORT).build();
    }
}
